﻿using System;

namespace Selection
{
    class Program
    {

        static void TellMeTheType(object x)
        {
            switch (x)
            {
                case int i:
                    Console.WriteLine("It's an int!");
                    Console.WriteLine($"The saquare of{i} is {i * i}");
                    break;
                case string s:
                    Console.WriteLine("It's a string");
                    Console.WriteLine($"The length of{s} is{s.Length}");
                    break;
                default:
                    Console.WriteLine("I don't know what x is");
                    break;
            }


        }

        static void Main(string[] args)
        {
            TellMeTheType(100);
            TellMeTheType("Joey and Lisa");
            TellMeTheType(true);

            TestSwitchExpressions();
        }

        static void TestSwitchExpressions()
        {
            SwitchExpressions switchExpressions = new SwitchExpressions();
            int cardNo = 13;
            Console.WriteLine(switchExpressions.CardName(cardNo));
        }

    }
}
